<template>
  <!-- 侧边菜单 -->
  <div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
      <div class="layui-logo">
        <span>{{ systemName }}</span>
      </div>
      <ul class="layui-nav layui-nav-tree" id="menu" lay-filter="layadmin-system-side-menu">
        <li class="layui-nav-item" v-for="item in menuInfo "  >
          <!-- <a v-if="item.childList.length==0" href="javascript:;" :lay-tips="item.desc">{{item.desc}}</a> -->
          <!-- <a href="javascript:;" :lay-tips="item.desc">
            <i :class="item.icon" ></i>
            <cite>{{item.desc}}</cite>
          </a> -->
          <a
            :lay-href="item.url"
            style="margin-left: 10px; cursor: pointer"
            :lay-tips="item.desc"
          >
            <i :class="item.icon" style="cursor: pointer"></i>
            <cite style="cursor: pointer">{{ item.desc }}</cite>
          </a>
          <!-- <user-manager-menu v-bind:list="item.childList"></user-manager-menu> -->
          <LeftMenu v-bind:list="item.childList"></LeftMenu>
        </li>
      </ul>
    </div>
  </div>
</template>
<style>
@import '../../../../assets/css/manager/admin.css';
</style>
<script>
import LeftMenu from '../../../common/LeftMenu.vue';
export default {
  components: { LeftMenu },
  name: "menuTree",
  data() {
    return {
      menuInfo:[],
      systemName: "后台管理平台",
      count: 0,
    };
  },
  mounted: function () {
    this.$nextTick(function(){
      this.initMenu();
    })
  },
  methods:{
    initMenu:function(){
      var that=this;
      this.post(this.businessUser+'/userMenu',function(data){
        if(data.code=="000000"){
          that.menuInfo=data.result;
        }
        that.menuInfo=data.result;
      })
    },
  },
  updated:function(){
    this.initLayui();
  }
};
</script>